package com.example.springcloud_01sericefeign.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @description:
 * @author: guoc
 * @createDate: 2020/6/28 17:21
 */
@FeignClient(value = "service-hi",fallback = SchedualServiceHiHystric.class)
//定义feign客户端,参数value = "service-hi"为服务名
public interface SchedualServiceHi {

    @RequestMapping(value = "/hi",method = RequestMethod.GET)  //参数是消费服务的接口名hi
    String sayHiFromClientOne(@RequestParam(value = "name") String name);

}
